<template>
  <view class="recordList">
    <view class="recordList_item" v-for="i in props.issueOneList" :key="i.issueOneId">
      <view class="record_status"  v-if="props.ifAccessories !== '1'">{{ i.ifRead === "1" ? "已阅" : "未阅" }}</view>
      <view class="record_status" v-else>{{ i.ifDo === "1" ? "已办" : "未办" }}</view>
      <view class="record_cont">{{ i.feedback }}</view>
      <view class="record_file" v-if="i.fileList.length > 0">
        <view class="file_item" @click="handlePrveFile(ele)" v-for="(ele, index) in i.fileList" :key="index">
          {{ ele.originalName }}
        </view>
      </view>
      <view class="record_time">{{ i.objectName }} {{ i.completionTime }}</view>
    </view>
  </view>
</template>
<script setup>
import { ref } from "vue";
import {viewFile} from '@/utils/common'
const props = defineProps({
  issueOneList: {},
  ifAccessories: {
    type: String,
    default: () => {
      return "1";
    },
  },
});
function handlePrveFile(ele){
  viewFile(ele)
}
</script>

<style lang="scss" scoped>
.recordList {
  width: 100%;
  font-size: 26rpx;
  color: #333333;
  max-height: 400rpx;
  overflow-y: scroll;
  .recordList_item {
    border: 1rpx solid #ececec;
    border-bottom: none;
    padding: 10rpx;
    .record_time {
      text-align: right;
    }
    &:last-child {
        border-bottom: 1rpx solid #ececec;
    }
    .record_status,
    .record_cont,
    .record_file {
      margin-bottom: 10rpx;
    }
    .record_file {
      color: #0d80d7;
      margin-bottom: 0rpx;
      .file_item {
        margin-bottom: 30rpx;
        &:last-child {
          margin-bottom: 0rpx;
        }
      }
    }
  }
}
</style>
